$(function () {
//声明变量

    var memberAnalysis_datagrid = $("#memberAnalysis_datagrid");

    memberAnalysis_datagrid.datagrid({
        url:'/memberAnalysis/query.do',
        toolbar:"#memberAnalysis_toolbar",
        fit:true,
        fitColumns:true,
        rownumbers:true,
        pagination:true,
        singleSelect:true,
        columns:[[
            {field:'id',checkbox:true,hidden:true},
            {field:'cardNumber',title:'会员卡号',width:80},
            {field:'name',title:'会员名',width:80},
            {field:'tel',title:'会员电话',width:80},
            {field:'birthday',title:'会员生日',width:80},
            {field:'levelName',title:'会员等级',width:80},
            {field:'sourceName',title:'客户来源',width:80},
            {field:'points',title:'会员积分',width:80},
            {field:'balance',title:'会员余额',width:80}
        ]]
    });

    var methodObj = {

        query:function (){
            //获取查询条件
            var minTime = $("#minTime").datebox('getValue');
            var maxTime = $("#maxTime").datebox('getValue');
            var keyword = $("#keyword").textbox('getValue');

            memberAnalysis_datagrid.datagrid('load',{//这个是数据表格,下面函数是获取数据表达的值
                minTime:minTime,
                maxTime:maxTime,
                keyword:keyword
            });
        },


    };
    //统一绑定事件:
    $("a[data-cmd]").click(function () {
        var methodname = $(this).data("cmd");
        //动态获取调用方法名字,调用方法;
        methodObj[methodname]();
    })
});


//删除

//编辑

//============表单的 按钮 保存/取消=================


//保存密码


//高级查询


//修改密码

